package edu.utdallas.cs.securechat.ui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JFrame;
import javax.swing.JPanel;

public class ClientPanel extends JPanel{

	private static final long serialVersionUID = -4969012987123653873L;
	private ClientFrame mainFrame;

	public ClientPanel(ClientFrame mainFrame){
		this.mainFrame = mainFrame;
		setLayout(new BorderLayout());
		setPreferredSize(new Dimension(500, 300));
		add(new ChatPanel(mainFrame), BorderLayout.CENTER);
	
		
	}
	
	public void createAndShowGUI(){
		mainFrame.setTitle("Secure Chat");
        mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        //Add content to the window.
        mainFrame.add(this);
        //Display the window.
        mainFrame.pack();
        mainFrame.setVisible(true);
	}
	
	
}
